"""Library for TAPA C rewriter's internal implementation."""

# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors.
# All rights reserved. The contributor(s) of this file has/have agreed to the
# RapidStream Contributor License Agreement.

load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//tapacc:__subpackages__"])

cc_library(
    name = "mmap",
    srcs = ["mmap.cpp"],
    hdrs = ["mmap.h"],
    deps = [
        ":type",
    ],
)

cc_library(
    name = "stream",
    srcs = ["stream.cpp"],
    hdrs = ["stream.h"],
    deps = [
        ":type",
    ],
)

cc_library(
    name = "task",
    srcs = ["task.cpp"],
    hdrs = ["task.h"],
    deps = [
        ":mmap",
        ":stream",
        "//tapacc/target:all_targets",
        "//tapacc/target:base_target",
        "//tapacc/target:xilinx_hls_target",
        "@nlohmann_json//:json",
    ],
)

cc_library(
    name = "type",
    srcs = ["type.cpp"],
    hdrs = ["type.h"],
    deps = [
        "@tapa-llvm-project//clang:tooling",
    ],
)
